#include <iostream>
#include "header/Client.h"

using namespace std;

int main() {
    string message_list[] = {
            "Hello World!",
            "How Are You!",
            "What Is You Name!",
            "China Is Best Country!",
            "Server, Are You All Right?",
            "Hei, Boy Are You Ok!"
    };

    int message_count = sizeof(message_list) / sizeof(string);

    Client::startClient();

    // 加密和解密算法存在Bug, 对于特定的字符串存在加密解密出现异常的情况!
    for (int i = 0; i < message_count; ++i) {
        cout << Client::sendMessageToSever(message_list[i]) << endl;
        sleep(1);
    }

    Client::endClient();
    printf("Client And Server Communication Complete!\n");
    getchar();
    system("pause");

    return 0;
}
